package creational.factory.abstractFactory;

import creational.factory.abstractFactory.products.Cpu;
import creational.factory.abstractFactory.products.PcCpu;
import creational.factory.abstractFactory.products.PcRam;
import creational.factory.abstractFactory.products.Ram;

public class PcCreator implements ComputerCreator {
    @Override
    public Cpu creatorCpu() {
        return new PcCpu();
    }

    @Override
    public Ram creatorRam() {
        return new PcRam();
    }

    @Override
    public void init() {
        System.out.println(String.format("PC 初始化，处理器： %s, 内存：%s ", creatorCpu().name(), creatorRam().name()));
    }
}
